//package qc.gateway.config;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.core.io.ClassPathResource;
//import org.springframework.web.reactive.function.server.RouterFunction;
//import org.springframework.web.reactive.function.server.RouterFunctions;
//import org.springframework.web.reactive.function.server.ServerResponse;
//
///**
// * 静态资源路由配置
// *
// * @author QuCheng Tech
// * @since 2025/1/11
// */
//@Configuration
//public class QCStaticResourceRouteConfig {
//    //@Bean
//    //public RouteLocator staticResourceRouteLocator(RouteLocatorBuilder builder) {
//    //    RouteLocatorBuilder.Builder routes = builder.routes();
//    //    routes.route("favicon", r -> r.path("/favicon.ico").uri("http://www.baidu.com")).build();
//    //    return routes.build();
//    //}
//
//    @Bean
//    public RouterFunction<ServerResponse> staticResourceLocator() {
//        //return RouterFunctions.resources("/.well-known/**", new ClassPathResource("/.well-known/"));
//        return RouterFunctions.resources("/favicon.ico", new ClassPathResource("/static/favicon.ico"));
//    }
//
//    //@Bean
//    //public RouterFunction<ServerResponse> route(RouterFunction<ServerResponse> routerFunction) {
//    //    return routerFunction
//    //            .andRoute(RequestPredicates.GET("/favicon.ico"), request ->
//    //                    ServerResponse.ok()
//    //                            .bodyValue(DataBufferUtils.read(new ClassPathResource("static/favicon.ico"), new DefaultDataBufferFactory(), 4096)));
//    //}
//}
